package com.lee;

/**
 * @Description TODO
 */
public class SwitchPatternTest {
    public static void main(String[] args) {
        var str = "a";
        switch (str) {
            case "a" -> System.out.println("a");
            case "b" -> System.out.println("b");
            default -> System.out.println("default");
        }
        Object obj = "a";
        switch (obj){
            case null -> System.out.println("null");
            case Integer i -> System.out.println(i);
            case Long l -> System.out.println(l);
            default -> System.out.println("default");
        }
    }
}
